﻿<Window x:Class="JenkinsController.View.LogsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="{Binding Build.DisplayName, StringFormat={}{0} raw logs}" Height="500" Width="600"
        Icon="..\Resources\Moustache.ico">
    <DockPanel Margin="10" LastChildFill="True">

        <Grid DockPanel.Dock="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            
            <TextBox Text="{Binding QuickFilter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,10,0" />
            
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="1" VerticalAlignment="Center">
                <Label VerticalAlignment="Center">Auto refresh:</Label>
                <CheckBox VerticalAlignment="Center" IsChecked="{Binding IsAutoRefreshed}" Margin="10,0,0,0"
                          ToolTip="Activate auto-refresh (3 sec. timer)" />
            </StackPanel>
        </Grid>

        <TextBox Name="LogsBox" Text="{Binding FilteredLogText}" HorizontalScrollBarVisibility="Auto"
                 VerticalScrollBarVisibility="Auto" IsReadOnly="True" FontFamily="Consolas" Margin="0,10,0,0" />
    </DockPanel>
</Window>